package org.howie;

import java.util.HashMap;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        HashMap<Character,Integer> hm = new HashMap();
        String s="HSBSHSBSBBSSCCHHH";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if(null != hm.get(c)){
                hm.put(c,hm.get(c)+1);
            }else {
                hm.put(c,1);
            }
        }
        System.out.println(hm);
    }
}
